package com.cn.zy.protocol.entity;

import java.util.List;

/**
 * @author zhangyi
 * @date 2019/2/25 16:06
 */
public class PClass {
    private int gradeNum;
    private int classNum;
    private Person headTeacher;
    private List<Person> students;

    public int getGradeNum() {
        return gradeNum;
    }

    public void setGradeNum(int gradeNum) {
        this.gradeNum = gradeNum;
    }

    public int getClassNum() {
        return classNum;
    }

    public void setClassNum(int classNum) {
        this.classNum = classNum;
    }

    public Person getHeadTeacher() {
        return headTeacher;
    }

    public void setHeadTeacher(Person headTeacher) {
        this.headTeacher = headTeacher;
    }

    public List<Person> getStudents() {
        return students;
    }

    public void setStudents(List<Person> students) {
        this.students = students;
    }

    public PClass(int gradeNum, int classNum, Person headTeacher, List<Person> students) {
        this.gradeNum = gradeNum;
        this.classNum = classNum;
        this.headTeacher = headTeacher;
        this.students = students;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"gradeNum\":")
                .append(gradeNum);
        sb.append(",\"classNum\":")
                .append(classNum);
        sb.append(",\"headTeacher\":")
                .append(headTeacher);
        sb.append(",\"students\":")
                .append(students);
        sb.append('}');
        return sb.toString();
    }
}
